package cn.jdy.anquan.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;

import cn.jdy.common.bo.BaseEntry;
import cn.jdy.platform.entity.ConfValue;
import cn.jdy.plugins.entity.Company;

/**
 * 中小企业信息库--企业安全
 * 
 * @author zhaigt
 * @date 2015年5月26日
 */
@Entity
public class CompanySafe extends BaseEntry {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Integer id;// 主键
	@Column(nullable = false, updatable = false)
	private Integer companyId;// 企业ID
	@Column(length = 30)
	private String tel; // 联系电话
	@Column(length = 50)
	private String website; // 企业网址
	@Column(length = 32)
	private String typeId; // 所属行业-标识

	// 行业分类
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "typeId", insertable = false, updatable = false)
	private ConfValue bType;

	// 关联公司信息
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "companyId", insertable = false, updatable = false)
	private Company company;

	@Transient
	@Column(length = 20)
	private String typeName; // 所属行业-名称

	@Column(length = 2)
	private String status; // 状态
	@Column(length = 30)
	private String pcp; // 公安机关备案号
	@Column(length = 30)
	private String icp; // 工信部许可/备案号码
	@Column(length = 10)
	private String linkMan; // 联系人
	@Column(length = 20)
	private String linkTel; // 联系人联系方式

	@Column(length = 20)
	private String province;// 所在地区 省
	@Column(length = 20)
	private String city;// 所在地区 市
	@Column(length = 20)
	private String county;// 所在地区 县级
	@Column(length = 20)
	private String location; // 机房位置

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}

	public void setbType(ConfValue bType) {
		this.bType = bType;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getWebsite() {
		return website;
	}

	public void setWebsite(String website) {
		this.website = website;
	}

	public String getTypeId() {
		return typeId;
	}

	public void setTypeId(String typeId) {
		this.typeId = typeId;
	}

	public ConfValue getbType() {
		return bType;
	}

	public void setbClass(ConfValue bType) {
		this.bType = bType;
	}

	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getPcp() {
		return pcp;
	}

	public void setPcp(String pcp) {
		this.pcp = pcp;
	}

	public String getIcp() {
		return icp;
	}

	public void setIcp(String icp) {
		this.icp = icp;
	}

	public String getLinkMan() {
		return linkMan;
	}

	public void setLinkMan(String linkMan) {
		this.linkMan = linkMan;
	}

	public String getLinkTel() {
		return linkTel;
	}

	public void setLinkTel(String linkTel) {
		this.linkTel = linkTel;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCounty() {
		return county;
	}

	public void setCounty(String county) {
		this.county = county;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public Company getCompany() {
		return company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}

}
